package one.stand.controller;

import one.stand.model.ResultModel;
import one.stand.request.FollowRecordRequest;
import one.stand.response.FollowRecordResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Administrator
 */
@RestController
@RequestMapping("followRecord")
public class FollowRecordController extends BaseController{

    /**
     * 获取跟进记录
     * @param request
     * @return
     */
    @PostMapping("getFollowList")
    public ResultModel<List<FollowRecordResponse>> getFollowList(@RequestBody FollowRecordRequest request){
        return followRecordService.getFollowList(request);
    }

    /**
     * 录入跟进记录
     * @param request
     * @return
     */
    @PostMapping("addFollow")
    public ResultModel<Boolean> addFollow(@RequestBody FollowRecordRequest request){
        return followRecordService.addFollow(request);
    }
}
